package pers.liuchengyin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.liuchengyin.pojo.Result;
import pers.liuchengyin.pojo.SkuModel;
import pers.liuchengyin.service.EsSaveService;

import java.util.List;

/**
 * @ClassName EsSaveController
 * @Description
 * @Author 柳成荫
 * @Date 2022/3/27
 */
@RestController
@RequestMapping("/es/doc")
public class EsSaveController {

    @Autowired
    private EsSaveService esSaveService;

    @PostMapping("/save/sku")
    public Result<List<String>> saveSku(@RequestBody List<SkuModel> skuModels) {
        return esSaveService.saveSku(skuModels);
    }

    /*
        使用POSTMAN调用

     */
}
